﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JXT.PrimaryKey.Batman.Domain.Models;

namespace JXT.PrimaryKey.Batman.Domain.UserSystem.Models
{
    [Serializable]
    public class UserStatus : ValueObjectBase<UserStatus>
    {
        public int UserId { get; set; }

        public int LoginNum { get; set; }

        public DateTime RegisterTime { get; set; }

        public string RegisterIp { get; set; }

        public DateTime LastLoginTime { get; set; }

        public string LastLoginIp { get; set; }

        public string LoginToken { get; set; }

        public override bool Equals(UserStatus other)
        {
            if (other == null)
                return false;
            return UserId == other.UserId
                && LoginNum == other.LoginNum
                && RegisterTime == other.RegisterTime
                && RegisterIp == other.RegisterIp
                && LastLoginTime == other.LastLoginTime
                && LastLoginIp == other.LastLoginIp
                && LoginToken == other.LoginToken;
        }
    }
}
